package com.example.player.ex;


import com.example.player.web.JsonResult;

/**
 * 自定义异常类 业务逻辑层需要抛出这个异常
 * @author fendou2021
 * @create 2022-04-16 10:22
 */
public class ServiceException extends RuntimeException {

    private JsonResult.State state;

    public JsonResult.State getState() {
        return state;
    }

    public ServiceException(JsonResult.State state) {
        this.state = state;
    }

    public ServiceException(String message, JsonResult.State state) {
        super(message);
        this.state = state;
    }

    public ServiceException(String message, Throwable cause, JsonResult.State state) {
        super(message, cause);
        this.state = state;
    }

    public ServiceException(Throwable cause, JsonResult.State state) {
        super(cause);
        this.state = state;
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, JsonResult.State state) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.state = state;
    }

    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
